<!DOCTYPE html>
{% load static %}
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>接口测试平台</title>
    <link href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
    <script src="http://libs.baidu.com/jquery/1.10.2/jquery.min.js"></script>
    <script src="http://cdn.static.runoob.com/libs/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
<body>
<nav class="navbar navbar-default navbar-fixed-top" role="navigation" style="height: 43px">
    <div class="container">
        <ul class="nav nav-justified">
            <li class="navbar-link"><a href="#" style="margin-left: 950px" class="glyphicon glyphicon-user">&nbsp{{user}}</a></li>
            <li class="navbar-link"><a href="/login/" target="_top">退出</a></li>
        </ul>
    </div>
</nav>
<div class="col-sm-offset-4" style="font-size: 20px;color: #53245d;padding-top: 80px">
    <h5 href="#" style="font-size: 25px">流程接口测试用例</h5>
</div>
<form class="navbar-form"  style="padding-top: 30px;margin-left: 7px">
    <div class="form-group">
        <input id="ipt2" name="Api_name" type="text" placeholder="用例名称" class="form-control">
    </div>
    <button id="btn4" type="submit" class="btn btn-default" style="background:#53245d;color: white;">搜索</button>
    {% csrf_token %}
</form>
<button id="btn1" class="btn btn-default col-sm-offset-2" style="background:#53245d;color:white;margin-top: -75px" data-toggle="modal" data-target="#addMyModal2"><span class="glyphicon glyphicon-plus" aria-hidden="true"></span>新增</button>
<div class="modal fade" id="addMyModal2" tabindex="-1" role="dialog" aria-labelledby="myModalLabel1" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button class="close" type="button" data-dismiss="modal" aria-hidden="true">&times</button>
                <h6 class="modal-title" id="myModalLabel1" style="font-size: 20px"><strong>新增用例</strong></h6>
            </div>
            <div class="modal-body">
                <form role="form" class="form-group" method="POST" id="form">
                    <label for="modelname">流程名称</label>
                    <input type="text"  name="processname" class="form-control" id="processname" placeholder="流程名称">
                    <label for="modelname">模块名</label>
                    <input type="text"  name="modelname" class="form-control" id="modelname" placeholder="模块名">
                    <label for="casename">用例名</label>
                    <input type="text" name="casename" class="form-control" id="casename" placeholder="用例名">
                    <label for="addUrl">URl</label>
                    <input type="text" name="addUrl" class="form-control" id="addUrl" placeholder="url" maxlength="300">
                    <label>Method</label>
                    <select  role="menu" class="form-control" name="addMethod" id="addMethod">
                        <option>Get</option>
                        <option>Post</option>
                        <option>Delete</option>
                        <option>Path</option>
                        <option>Put</option>
                    </select>
                    <div class="form-group" id="addheadersdiv">
                        <label for="headers">Headers</label>
                        <ul id="headers" style="list-style-type: none">
                            <li>
                                <input id="headers_data"  class="addheaders" maxlength="300" name="headers_key" type="text"  placeholder="Key"  /><input  class="addheaders" name="headers_value" type="text"  placeholder="Value"/>
                                <input id="addheaders" type="button" class="btn btn-default"  style="height:24px;width:24px;text-align:center; margin:0px; padding:0px;" value="+">
                                <input id="delheaders" type="button" class="btn btn-default"  style="height:24px;width:24px;text-align:center; margin:0px; padding:0px;" value="-">
                                <input id="addmergeheaders" type="text" style="display:None" maxlength="500" name="addmergeheaders"/>
                            </li>
                        </ul>
                    </div>
                    <div class="form-group" id="addformdatadiv">
                        <label for="formdatas" >Formdata</label>
                        <ul id="formdatas" style="list-style-type: none" >
                            <li>
                                <input   type="text" class="addformdata" maxlength="300" name="formdatas_key" placeholder="Key"  /><input   type="text" class="addformdata" name="formdatas_value" placeholder="Value" />
                                <input id="addformdata" type="button" class="btn btn-default"  style="height:24px;width:24px;text-align:center; margin:0px; padding:0px;" value="+">
                                <input id="delformdata" type="button" class="btn btn-default"  style="height:24px;width:24px;text-align:center; margin:0px; padding:0px;" value="-">
                                <input id="addmergeformdatas" type="text" style="display:None" maxlength="500"name="addmergeformdatas"/>
                            </li>
                        </ul>
                    </div>
                    <div class="form-group" id="adddependddatadiv">
                        <label for="dependdatas" >Dependdata</label>
                        <ul id="dependdatas" style="list-style-type: none" >
                            <li>
                                <input   type="text" class="adddependdata" maxlength="300" name="dependdatas_key" placeholder="Key"  /><input   type="text" class="adddependdata" name="dependdatas_value" placeholder="Value" />
                                <input id="adddependdata" type="button" class="btn btn-default"  style="height:24px;width:24px;text-align:center; margin:0px; padding:0px;" value="+">
                                <input id="deldependdata" type="button" class="btn btn-default"  style="height:24px;width:24px;text-align:center; margin:0px; padding:0px;" value="-">
                                <input id="addmergedependdatas" type="text" style="display:None" maxlength="500" name="addmergedependdatas"/>
                            </li>
                        </ul>
                    </div>
                    <div class="form-group" id="addcheckdatadiv">
                        <label for="checkdatas" >Assert</label>
                        <ul id="checkdatas" style="list-style-type: none" >
                            <li>
                                <input   type="text" class="addformdata" maxlength="300" name="checkdatas_key" placeholder="Key"  /><input   type="text" name="checkdatas_value" class="addformdata" placeholder="Value" />
                                <input id="addcheckdata" type="button" class="btn btn-default"  style="height:24px;width:24px;text-align:center; margin:0px; padding:0px;" value="+">
                                <input id="delcheckdata" type="button" class="btn btn-default"  style="height:24px;width:24px;text-align:center; margin:0px; padding:0px;" value="-">
                                <input id="addmergecheckdatas" type="text" style="display:None" maxlength="500" name="addmergecheckdatas"/>
                            </li>
                        </ul>
                    </div>
                    <label for="charger">负责人</label>
                    <input type="text" name="charger" class="form-control"  id="charger" placeholder="负责人">
                    <div class="modal-footer">
                        <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                        <button type="submit" class="btn btn-default" data-dismiss="modal" id="addsubmitBtn" style="background:#53245d;color:white;">提交</button>
                    </div>
                    {% csrf_token %}
                </form>
            </div>
        </div>
    </div>
</div>
</div>
<div class="container col-md-11">
    <table class="table table-bordered table-striped table-hover" style="margin-left:10px;margin-top: -30px;table-layout: fixed">
        <thead>
        <tr>
            <th>流程名称</th>
            <th>ID</th>
            <th>模块名</th>
            <th>用例名</th>
            <th>URL</th>
            <th>Method</th>
            <th>Header</th>
            <th>Formdata</th>
            <th>Dependdata</th>
            <th>Assert</th>
            <th>负责人</th>
            <th>时间</th>
            <th style="width: 160px">编辑</th>
        </tr>
        </thead>
        <tbody>
        {% for step in steps %}
        <tr>
            <td>{{step.process_name}}</td>
            <td>{{step.productid}}</td>
            <td>{{step.modelname}}</td>
            <td>{{step.depend_Apiname}}</td>
            <td style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;">{{step.Apiurl_data}}</td>
            <td>{{step.Apimethod}}</td>
            <td style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;">{{step.Apiheader}}</td>
            <td style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;">{{step.Apiformdata}}</td>
            <td style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;">{{step.Apidependdata}}</td>
            <td style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;">{{step.Apiexpectresult}}</td>
            <td>{{step.Apischarger}}</td>
            <td>{{step.create_time}}</td>
            <td><button class="btn btn-default sm" data-toggle="modal"  data-target="#myModal2" type="button">删除</button>
                <div class="modal fade" id="myModal2" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
                    <div class="modal-dialog">
                        <div class="modal-content">
                            <div class="modal-body"><strong>删除用例</strong></div>
                            <h6 class="modal-title" id="myModalLabel" style="color: #53245d; margin-left: 200px;font-size: 15px"><strong>删除后无法撤销，请确认</strong></h6>
                            <div class="modal-footer">
                                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                                <button type="button" class="btn btn-primary" name="deleBtn" id="deleBtn" onclick="go_delete('{{step.productid}}')"  data-dismiss="modal"  style="background:#53245d;color:white;">删除</button>
                            </div>
                        </div>
                    </div>
                </div>
                <button class="btn btn-default sm" onclick="go_change('{{step.productid}}')" data-toggle="modal" data-target="#myModal3">编辑</button>
                <div class="modal fade" id="myModal3" tabindex="-1" role="dialog" aria-labelledby="myModalLabel3" aria-hidden="true">
                        <div class="modal-dialog">
                            <div class="modal-content">
                                <div class="modal-header">
                                    <button class="close" type="button" data-dismiss="modal" aria-hidden="true">&times</button>
                                    <h6 class="modal-title" id="myModalLabel3"><strong>修改项目</strong></h6>
                                </div>
                                <div class="modal-body">
                                    <form role="form" class="form-group" id="change_form">
                                        <label for="modelname">流程名称</label>
                                        <input type="text"  name="processname" class="form-control" id="changeprocessname" placeholder="流程名称">
                                        <label for="modelname">模块名</label>
                                        <input type="text"  name="changemodel" class="form-control" id="changemodel" placeholder="模块名">
                                        <label for="casename">用例名</label>
                                        <input type="text" name="changecase" class="form-control" id="changecase" placeholder="用例名">
                                        <label for="changeUrl">URl</label>
                                        <input type="text" name="changeUrl" class="form-control" id="changeUrl" placeholder="url">
                                        <label>Method</label>
                                        <select  role="menu" class="form-control" name="changeMethod" id="changeMethod">
                                            <option>Get</option>
                                            <option>Post</option>
                                            <option>Delete</option>
                                            <option>Path</option>
                                            <option>Put</option>
                                        </select>
                                        <div class="form-group" id="changeheadersdiv">
                                            <label for="changeheaders">Headers</label>
                                            <ul id="changeheaders" style="list-style-type: none">
                                                <li>
                                                    <input id="change_headers_data"  class="addheaders" name="change_headers_key" type="text"  placeholder="Key"  /><input  class="addheaders" name="change_headers_value"  type="text"  placeholder="Value" />
                                                    <input id="change_addheaders" type="button" class="btn btn-default"  style="height:24px;width:24px;text-align:center; margin:0px; padding:0px;" value="+">
                                                    <input id="change_delheaders" type="button" class="btn btn-default"  style="height:24px;width:24px;text-align:center; margin:0px; padding:0px;" value="-">
                                                    <input id="changemergeheaders" type="text" style="display:None" name="changemergeheaders"/>
                                                </li>
                                            </ul>
                                        </div>
                                        <div class="form-group" id="changeformdatadiv">
                                            <label for="changeformdatas" >Formdata</label>
                                            <ul id="changeformdatas" style="list-style-type: none" >
                                                <li>
                                                    <input   type="text" class="addformdata" name="change_formdata_key" placeholder="Key"  /><input   type="text" class="addformdata" name="change_formdata_value" placeholder="Value" />
                                                    <input id="change_addformdata" type="button" class="btn btn-default"  style="height:24px;width:24px;text-align:center; margin:0px; padding:0px;" value="+">
                                                    <input id="change_delformdata" type="button" class="btn btn-default"  style="height:24px;width:24px;text-align:center; margin:0px; padding:0px;" value="-">
                                                    <input id="changemergeformdatas" type="text" style="display:None" name="changemergeformdatas"/>
                                                </li>
                                            </ul>
                                        </div>
                                        <div class="form-group" id="changedependdatadiv">
                                            <label for="changedependdatas" >Dependdata</label>
                                            <ul id="changedependdatas" style="list-style-type: none" >
                                                <li>
                                                    <input   type="text" class="adddependdata" name="change_dependdata_key" placeholder="Key"  /><input   type="text" class="adddependdata" name="change_dependdata_value" placeholder="Value" />
                                                    <input id="change_adddependdata" type="button" class="btn btn-default"  style="height:24px;width:24px;text-align:center; margin:0px; padding:0px;" value="+">
                                                    <input id="change_deldependdata" type="button" class="btn btn-default"  style="height:24px;width:24px;text-align:center; margin:0px; padding:0px;" value="-">
                                                    <input id="changemergedependdatas" type="text" style="display:None" name="changemergedependdatas"/>
                                                </li>
                                            </ul>
                                        </div>
                                        <div class="form-group" id=changecheckdatadiv">
                                            <label for="changecheckdatas" >Checkdata</label>
                                            <ul id="changecheckdatas" style="list-style-type: none" >
                                                <li>
                                                    <input   type="text" class="addformdata" name="change_checkdata_key" placeholder="Key"  /><input   type="text" class="addformdata" name="change_checkdata_value" placeholder="Value" />
                                                    <input id="change_addcheckdata" type="button" class="btn btn-default"  style="height:24px;width:24px;text-align:center; margin:0px; padding:0px;" value="+">
                                                    <input id="change_delcheckdata" type="button" class="btn btn-default"  style="height:24px;width:24px;text-align:center; margin:0px; padding:0px;" value="-">
                                                    <input id="changemergecheckdatas" type="text" style="display:None" name="changemergecheckdatas"/>
                                                </li>
                                            </ul>
                                        </div>
                                        <label for="changecharger">负责人</label>
                                        <input type="text" name="changecharger" class="form-control" id="changecharger" placeholder="负责人">
                                        <div class="modal-footer">
                                            <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                                            <button type="submit"  class="btn btn-default" id="changesubmitBtn2" style="background:#53245d;color:white;">提交</button>
                                        </div>
                                     {% csrf_token %}
                                    </form>
                                </div>
                            </div>
                        </div>
                </div>
            </td>
        </tr>
        {% endfor %}
        </tbody>
    </table>
</div>
<nav>
    <ul class="pager pagination navbar-fixed-bottom">
        {% if steps.has_previous %}
        <li class="previous"><a href="?page={{products.previous_page_number}}" style="margin-left: 600px">上一页</a></li>
        {% else %}
        <li class="previous disabled"><a href="#" style="margin-left: 600px">上一页</a></li>
        {% endif %}
        {% for num in steps.paginator.page_range %}
        {% if num == currentPage %}
        <li class="item active"><a href="?page={{num}}" style="margin-left: 30px">{{num}}</a></li>
        {% else %}
        <li class="item"><a href="?page={{num}}" style="margin-left: 30px">{{num}}</a></li>
        {% endif %}
        {% endfor %}
        {% if steps.has_next %}
        <li class="next"><a href="?page={{steps.next_page_number}}"  style="margin-right: 800px">下一页</a></li>
        {% else %}
        <li class="next disabled"><a href="#" style="margin-right: 800px">下一页</a></li>
        {% endif %}
    </ul>
</nav>
</body>
<script>
    //列表数据一旦超过30个字符串就只显示，25个字符串+...
    function display(){
        var elements=$("#table").find("td");
        for (var i=0;i<elements.length;i++){
            $(elements[i]).attr("title",$(elements[i]).text());
            if ($(elements[i]).text().length>=30){
                var str=$(elements[i]).text().substring(0,25)+"...";
                $(elements[i]).html(str);
            }
            //当鼠标在列表上悬停时，出现内容
            $(elements[i]).mouseover(function(){
                $(this).tooltip;
            });
        }
    }
    //增加headers行列
    $(function () {
        $("#addheaders").click(function () {
            $("#headers").append("<li><input   type=\"text\" name=\"headers_key\"  placeholder=\"Key\"  /><input   type=\"text\" name=\"headers_value\"  placeholder=\"Value\" /></li>");
        });
        $("#delheaders").click(function () {
            if ($("#headers li").length > 1) {
                $("#headers li:last").remove();
            }
        })
    });
    //增加formdata行列
    $(function () {
        $("#addformdata").click(function () {
            $("#formdatas").append("<li><input   type=\"text\" name=\"formdatas_key\" placeholder=\"Key\"  /><input   type=\"text\" name=\"formdatas_value\" placeholder=\"Value\" /></li>");
        });
        $("#delformdata").click(function () {
            if ($("#formdatas li").length > 1) {
                $("#formdatas li:last").remove();
            }
        })
    });
    //增加dependdata行列
    $(function () {
        $("#adddependdata").click(function () {
            $("#dependdatas").append("<li><input   type=\"text\" name=\"dependatas_key\" placeholder=\"Key\"  /><input   type=\"text\" name=\"dependdatas_value\" placeholder=\"Value\" /></li>");
        });
        $("#deldependdata").click(function () {
            if ($("#dependdatas li").length > 1) {
                $("#dependdatas li:last").remove();
            }
        })
    });
    //增加验证项
    $(function () {
        $("#addcheckdata").click(function () {
            $("#checkdatas").append("<li><input   type=\"text\" name=\"checkdatas_key\" placeholder=\"Key\"  /><input   type=\"text\" name=\"checkdatas_value\" placeholder=\"Value\" /></li>");
        });
        $("#delcheckdata").click(function () {
            if ($("#checkdatas li").length > 1) {
                $("#checkdatas li:last").remove();
            }
        });
    });
    //获取input框中的值
    $("#addsubmitBtn").click(function () {
            var objone={};
            var a=document.querySelectorAll("input[name='headers_key']");
            var b=document.querySelectorAll("input[name='headers_value']");
            for(var i=0;i<a.length;i++){
                var keyone = a[i].value;
                var valueone = b[i].value;
                objone[keyone]=valueone;
            }
            objonestring = JSON.stringify(objone);
            $("#addmergeheaders").val(objonestring);
            console.info(objonestring);
            var objthree={};
            var e=document.querySelectorAll("input[name='formdatas_key']");
            var f=document.querySelectorAll("input[name='formdatas_value']");
            for(var k=0;k<e.length;k++){
                var keythree = e[k].value;
                var valuethree = f[k].value;
                objthree[keythree]=valuethree;
            }
            objthreestring = JSON.stringify(objthree);
            $("#addmergeformdatas").val(objthreestring);
            var objfour={};
            var aa=document.querySelectorAll("input[name='dependdatas_key']");
            var bb=document.querySelectorAll("input[name='dependdatas_value']");
            for(var r=0;r<aa.length;r++){
                var keyfour = aa[r].value;
                var valuefour = bb[r].value;
                objfour[keyfour]=valuefour;
            }
            objfourstring = JSON.stringify(objfour);
            $("#addmergedependdatas").val(objfourstring);
            var objfive={};
            var g=document.querySelectorAll("input[name='checkdatas_key']");
            var h=document.querySelectorAll("input[name='checkdatas_value']");
            for(var l=0;l<g.length;l++){
                var keyfive = g[l].value;
                var valuefive = h[l].value;
                objfive[keyfive]=valuefive;
            }
            objfivestring = JSON.stringify(objfive);
            $("#addmergecheckdatas").val(objfivestring);
    });
    $('#addsubmitBtn').click(function go_add () {
        $.ajax({
            cache:false,
            url : "add_depend_data_apis/",
            dataType:'text',
            type:'POST',
            async:false,
            data:{
                "processname":$("#processname").val(),
                "modelname": $("#modelname").val(),
                "casename": $("#casename").val(),
                "addURL": $("#addUrl").val(),
                "Method": $("#addMethod").val(),
                "addmergeheaders":$("#addmergeheaders").val(),
                "addmergeformdatas":$("#addmergeformdatas").val(),
                "addmergedependdatas":$("#addmergedependdatas").val(),
                "addmergecheckdatas":$("#addmergecheckdatas").val(),
                "charger":$("#charger").val(),
            },
            success: function (data) {
                alert("提交成功");
                window.location.reload();
                console.log(data);
            },
            error:function (data) {
                console.log(data);
                alert("数据重复/提交失败");
            }
        })
    });
    function go_delete (id) {
        $.ajax({
            cache: false,
            url: "delete_depend_api/",
            dataType: 'text',
            type: 'POST',
            async: false,
            data: {
                "id":id
            },
            success: function (data) {
                console.log(data);
                alert('删除成功');
                window.location.reload()
            },
            error:function (data) {
                console.log(data);
                alert('删除失败')
                }
            })
    }
     //修改项中添加headers行
    $("#change_addheaders").click(function () {
        $("#changeheaders").append("<li><input   type=\"text\" name=\"change_headers_key\"  placeholder=\"Key\"  /><input   type=\"text\" name=\"change_headers_value\"  placeholder=\"Value\" /></li>");
    });
    $("#change_delheaders").click(function () {
        if ($("#changeheaders li").length > 1) {
            $("#changeheaders li:last").remove();}
    });
    //修改项中添加formdatas行
    $("#change_addformdata").click(function () {
        $("#changeformdatas").append("<li><input   type=\"text\" name=\"change_formdata_key\"  placeholder=\"Key\"  /><input   type=\"text\" name=\"change_formdata_value\"  placeholder=\"Value\" /></li>");
    });
    $("#change_delformdata").click(function () {
        if ($("#changeformdatas li").length > 1) {
            $("#changeformdatas li:last").remove();}
    });
    //修改项中添加dependdatas行
    $("#change_adddependdata").click(function () {
        $("#changedependdatas").append("<li><input   type=\"text\" name=\"change_dependdata_key\"  placeholder=\"Key\"  /><input   type=\"text\" name=\"change_dependdata_value\"  placeholder=\"Value\" /></li>");
    });
    $("#change_deldependdata").click(function () {
        if ($("#changedependdatas li").length > 1) {
            $("#changedependdatas li:last").remove();}
    });
    //修改项中添加checkdatas行
    $("#change_addcheckdata").click(function () {
        $("#changecheckdatas").append("<li><input   type=\"text\" name=\"change_checkdata_key\"  placeholder=\"Key\"  /><input   type=\"text\" name=\"change_checkdata_value\"  placeholder=\"Value\" /></li>");
    });
    $("#change_delcheckdata").click(function () {
        if ($("#changecheckdatas li").length > 1) {
            $("#changecheckdatas li:last").remove();}
    });

    //提交修改的数据
    $("#changesubmitBtn2").click(function () {
        var objectone={};
        var o=document.querySelectorAll("input[name='change_headers_key']");
        var p=document.querySelectorAll("input[name='change_headers_value']");
        for(var w=0;w<o.length;w++){
            var changekeyone = o[w].value;
            var changevalueone = p[w].value;
            objectone[changekeyone]=changevalueone;
        }
        objectonestring = JSON.stringify(objectone);
        $("#changemergeheaders").val(objectonestring);
        console.info(objectonestring);
        var objectthree={};
        var s=document.querySelectorAll("input[name='change_formdata_key']");
        var t=document.querySelectorAll("input[name='change_formdata_value']");
        for(var y=0;y<s.length;y++){
            var keythree = s[y].value;
            var valuethree = t[y].value;
            objectthree[keythree]=valuethree;
        }
        objectthreestring = JSON.stringify(objectthree);
        $("#changemergeformdatas").val(objectthreestring);
        var objectfour={};
        var cc=document.querySelectorAll("input[name='change_dependdata_key']");
        var dd=document.querySelectorAll("input[name='change_dependdata_value']");
        for(var bb=0;bb<cc.length;bb++){
            var keyfour = cc[bb].value;
            var valuefour = dd[bb].value;
            objectfour[keyfour]=valuefour;
        }
        objectfourstring = JSON.stringify(objectfour);
        $("#changemergedependdatas").val(objectfourstring);
        var objectfive={};
        var u=document.querySelectorAll("input[name='change_checkdata_key']");
        var v=document.querySelectorAll("input[name='change_checkdata_value']");
        for(var z=0;z<u.length;z++){
            var keyfive = u[z].value;
            var valuefive = v[z].value;
            objectfive[keyfive]=valuefive;
        }
        objectfivestring = JSON.stringify(objectfive);
        $("#changemergecheckdatas").val(objectfivestring);
    });
    function go_change(id) {
        $("#changesubmitBtn2").click(function (){
            $.ajax({
                cache: false,
                url: "change_depend_api/",
                dataType: 'text',
                type: 'POST',
                async: false,
                data: {
                    "id": id,
                    "change_processname":$("#changeprocessname").val(),
                    "change_modelname": $("#changemodel").val(),
                    "change_casename": $("#changecase").val(),
                    "change_URL": $("#changeUrl").val(),
                    "change_Method": $("#changeMethod").val(),
                    "change_mergeheaders": $("#changemergeheaders").val(),
                    "change_mergeformdatas": $("#changemergeformdatas").val(),
                    "change_mergedependdatas":$("#changemergedependdatas").val(),
                    "change_mergecheckdatas": $("#changemergecheckdatas").val(),
                    "change_charger": $("#changecharger").val(),
                },
                success: function (data) {
                    console.log(data);
                    alert("提交修改成功");
                    window.location.reload();
                },
                error: function (data) {
                    console.log(data);
                    alert("数据重复/提交修改失败");
                }
            });
        });
    }
</script>
</html>